home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ASTRNOMY / AA_51.ZIP / KEP.H < prev    next >
C/C++ Source or Header  |  1993-02-13  |  3KB  |  96 lines

  1. /* General definitions for aa program */
  2.  
  3. #include <stdio.h>
  4.  
  5. struct orbit
  6.     {
  7.     char obname[16]; /* name of the object */
  8.     double epoch;    /* epoch of orbital elements */
  9.     double i;    /* inclination    */
  10.     double W;    /* longitude of the ascending node */
  11.     double w;    /* argument of the perihelion */
  12.     double a;    /* mean distance (semimajor axis) */
  13.     double dm;    /* daily motion */
  14.     double ecc;    /* eccentricity */
  15.     double M;    /* mean anomaly */
  16.     double equinox;    /* epoch of equinox and ecliptic */
  17.     double mag;    /* visual magnitude at 1AU from earth and sun */
  18.     double sdiam;    /* equatorial semidiameter at 1au, arc seconds */
  19. /* The following used by perterbation formulas: */
  20.     int (*oelmnt )(); /* address of program to compute elements */
  21.     int (*celmnt )(); /* program to correct longitude and radius */
  22.     double L;    /* computed mean longitude */
  23.     double r;    /* computed radius vector */
  24.     double plat;    /* perturbation in ecliptic latitude */
  25.     };
  26.  
  27. struct star
  28.     {
  29.     char obname[32];    /* Object name (31 chars) */
  30.     double epoch;        /* Epoch of coordinates */
  31.     double ra;        /* Right Ascension, radians */
  32.     double dec;        /* Declination, radians */
  33.     double px;        /* Parallax, radians */
  34.     double mura;        /* proper motion in R.A., rad/century */
  35.     double mudec;        /* proper motion in Dec., rad/century */
  36.     double v;        /* radial velocity, km/s */
  37.     double equinox;        /* Epoch of equinox and ecliptic */
  38.     };
  39. /* Note the items for a star are in different measurement units
  40.  * in the ASCII file description.
  41.  */
  42.  
  43. /* aa.c */
  44. extern double DTR;
  45. extern double RTD;
  46. extern double RTS;
  47. extern double STR;
  48. extern double PI;
  49. extern double J2000;
  50. extern double B1950;
  51. extern double J1900;
  52. extern double JD;
  53. extern double TDT;
  54. extern double UT;
  55. extern double dradt, ddecdt;
  56. extern int objnum, jdflag, prtflg;
  57. extern double obpolar[];
  58. extern double eapolar[];
  59. extern double rearth[];
  60. extern double dp[];
  61. /* angles.c */
  62. extern double SE, SO, EO, pq, ep, qe;
  63. /* nutate.c */
  64. extern double jdnut, nutl, nuto;
  65. /* epsiln.c */
  66. extern double jdeps, eps, coseps, sineps;
  67. /* vearth.c */
  68. extern double jvearth, vearth[];
  69. /* dms.c */
  70. double mod360(), modtp();
  71.  
  72. double acos(), asin(), atan(), zatan2(), cos(), sin();
  73. double tan(), sqrt(), fabs(), log(), floor(), polevl();
  74.  
  75. /* DEBUG = 1 to enable miscellaneous printouts. */
  76. #define DEBUG 0
  77.  
  78. /* OFDATE = 1 for equinox of date in Meeus planetary
  79.  * orbit perturbation formulas.
  80.  * OFDATE = 0 for equinox J2000.
  81.  */
  82. #define OFDATE 0
  83.  
  84. /* Earth longitude and radius per Bretagnon and Simon
  85.  * (see pearth.c).
  86.  */
  87. #define BandS 0
  88.  
  89. int showrd(), showcor(), dms(), hms(), jtocal(), epsiln();
  90. int fk4fk5(), kepler(), kinit(), getnum(), deltap();
  91. int lonlat(), nutate(), precess(), reduce(), rstar(), dosun();
  92. int lightt(), velearth(), diurpx(), diurab(), update();
  93. int relativity(), showcname(), annuab(), angles(), altaz();
  94. int manoms(), domoon();
  95. int getstar(), getorbit(), trnsit();
  96.